﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>jQuery Fundamentals</title>
    <link href="style.css" rel="stylesheet" type="text/css" media="all" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
</head>
<body>
    <img src="" alt="gosho"/>
    <img src="" alt="pesho" />
    <div id="res"></div>
    <script type="text/javascript">
        //problem one
        $("#hideButton").click(function () {
            $(".module").append("maikata ti deabba putko neshtastna");
        });
        //problem two
        $("#pesho").click(function () {
            $("#myList li:nth-child(3)").css("color", "green");
        });
        //problem three
        $("body").find("label").append("hdjwahj");
        //proble four
        var hiddenEls = $("body").find(":hidden").not("script");
        $(".module").append(hiddenEls.length);
        //problem five
        $("img").each(function () {
            var img = $(this);
            if (!img.attr("alt") || img.attr("alt") == "")
            $("#res").append("1 ");
        });
        //problem six
        $('#fruits tr:odd').css('color', 'red');
        //problem seven
        $("img").each(function () {
            var img = $(this);
            var alt = img.attr("alt");
            $("#res").append(alt);
        });
    </script>
</body>
</html>
